package com.hejielife.activeobject1;

/**
 * 2019年8月2日 下午5:15:56
 * 
 * @author hejielife
 * @despribe DisplayClientThread
 */
public class DisplayClientThread extends Thread {
	private final ActiveObject activeObject;

	public DisplayClientThread(String name, ActiveObject activeObject) {
		super(name);
		this.activeObject = activeObject;
	}

	public void run() {
		try {
			for (int i = 0; true; i++) {
				String string = Thread.currentThread().getName() + " " + i;
				activeObject.displayString(string);
				Thread.sleep(200);
			}
		} catch (InterruptedException e) {
		}
	}
}
